/**
 * 用户相关API
 * 对接Java后端: /api/mobile/user
 */

const { get, put } = require('../utils/request');

/**
 * 获取用户信息
 * GET /api/mobile/user/info
 */
function getUserInfo() {
  return get('/mobile/user/info');
}

/**
 * 更新用户信息
 * PUT /api/mobile/user/info
 */
function updateUserInfo(userInfo) {
  return put('/mobile/user/info', userInfo);
}

/**
 * 获取用户活动记录
 * GET /api/mobile/event/my-signups
 * 注：后端使用 event/my-signups 接口
 */
function getUserActivities(params = {}) {
  return get('/mobile/event/my-signups', params);
}

/**
 * 获取用户积分记录
 * GET /api/mobile/user/points
 */
function getUserPoints(params = {}) {
  return get('/mobile/user/points', params);
}

module.exports = {
  getUserInfo,
  updateUserInfo,
  getUserActivities,
  getUserPoints
};
